package com.yk.anima.api;

import com.yk.anima.pojo.ShoppingCart;
import com.yk.anima.response.QueryResponseResult;
import com.yk.anima.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.List;

/**
 * @author xiaokai
 * @create 2021-05-13 09:57:24
 * @desc... 管理购物车
 */
@Api(value = "管理购物车", description = "管理购物车")
public interface ShoppingCartApi {



    @ApiOperation("添加购物车")
    public ResponseResult save(@ApiParam("用户Id") int aId, @ApiParam("宠物归属类Id") int animalId,@ApiParam("当前宠物ID") int id );

    @ApiOperation("根据用户Id查询购物车")
    public List<ShoppingCart> findById(int cartAdminId);

    @ApiOperation("根据宠物Id删除购物车某个东西")
    public ResponseResult deleteById(@ApiParam("用户Id") int cartAdminId,@ApiParam("当前物品ID") int sId);

    @ApiOperation("清空购物车")
    public ResponseResult clear(int cartAdminId);

    @ApiOperation("增加购物车中物品的数量")
    public ResponseResult updateByNumAdd(@ApiParam("用户ID") int cartAdminId,@ApiParam("购物车宠物ID") int sId,@ApiParam("宠物归属类Id") int animalId,@ApiParam("当前宠物ID") int id);

    @ApiOperation("减少购物车中物品的数量")
    public ResponseResult updateByNumLess(@ApiParam("用户ID") int cartAdminId,@ApiParam("购物车宠物ID") int sId,@ApiParam("宠物归属类Id") int animalId,@ApiParam("当前宠物ID") int id);

    @ApiOperation("分页查询")
    public QueryResponseResult findByPage(int page, int size, String name);

}
